function reservationSave() {
    var instrId = $("#select1 option:selected").val();
    if(instrId==-1){
        swal("信息提示!","请选择仪器","warning");
        return;
    }
    var userId = $("[name=userId] option:selected").val();
    if(userId==-1){
        swal("信息提示!","请选择医师","warning");
        return;
    }
    var startDate = $("[name=reservationInstrStartDate]").val();
    if(startDate==null || startDate==''){
        swal("信息提示!","请选择预约开始时间","warning");
        return;
    }

    var endDate = $("[name=reservationInstrFinishDate]").val();
    if(endDate==null || endDate==''){
        swal("信息提示!","请选择预约结束时间","warning");
        return;
    }

    var param = $("#instrForm").serialize();
    var str = "startDate="+startDate+"&instrId="+instrId;
    console.info(param);
    $.post(ctx+"/director/reservationInstroe/searchInstrByDate",str,function (data) {
           if(data=="1" || data==1){
                $.post(ctx+"/director/reservationInstroe/addRI",param,function(msg){
                    swal({
                        title:"信息提示！",
                        text:msg,
                        type:"success",
                        allowOutsideClick:false
                    }).then(function () {
                        $("#back").trigger("click");
                    });
                });
           }else{
               swal("信息提示!","这个仪器在这个时间段有预约了!","warning");
           }
    });
}